﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Easyui扩展库 Textbox - 落阳 整理</title>
    <link href="http://www.easyui-extlib.com/Content/Site.css" rel="stylesheet" />
    <script src="http://www.easyui-extlib.com/Scripts/jquery/jquery-1.11.0.min.js"></script>
    <script src="http://www.easyui-extlib.com/Scripts/jquery-extensions/jquery.jdirk.js"></script>
    <link href="http://www.easyui-extlib.com/Scripts/jquery-easyui/jquery-easyui-1.4.3/themes/default/easyui.css" rel="stylesheet" />
    <link href="http://www.easyui-extlib.com/Scripts/jquery-easyui/jquery-easyui-1.4.3/themes/icon.css" rel="stylesheet" />
    <script src="http://www.easyui-extlib.com/Scripts/jquery-easyui/jquery-easyui-1.4.3/jquery.easyui.min.js"></script>
    <script src="http://www.easyui-extlib.com/Scripts/jquery-easyui/jquery-easyui-1.4.3/locale/easyui-lang-zh_CN.js"></script>

    <link href="http://www.easyui-extlib.com/Scripts/jquery-easyui-extensions/textbox/jeasyui.extensions.textbox.css" rel="stylesheet" />
    <script src="http://www.easyui-extlib.com/Scripts/jquery-easyui-extensions/linkbutton/jeasyui.extensions.linkbutton.setIcon.js"></script>
    <script src="http://www.easyui-extlib.com/Scripts/jquery-easyui-extensions/textbox/jeasyui.extensions.textbox.setButtonIcon.js"></script>
    <script>
        $(function () {

            $("#btnSet").click(function () {
                var value = $("#iconValue").val();
                if ($.string.isNullOrWhiteSpace(value)) { return; }

                $("#btnTarget").textbox("setButtonIcon", value);
            });

        });
    </script>
</head>
<body>
    <div class="easyui-panel" data-options="fit:true,border:false" style="padding:20px;">
        <input id="btnTarget" type="text" class="easyui-textbox" value="" data-options="buttonText: '保存',buttonIcon:'icon-save',iconCls: 'icon-search',iconAlign: 'left'" />
        <br /><br /><br /><br />
        <input id="iconValue" type="text" value="icon-edit" /> &nbsp;<span style="color:red;">请自行输入要设置给上述 textbox 的按钮图标样式</span>
        <br />
        <a id="btnSet" class="easyui-linkbutton" data-options="iconCls:'icon-edit'">设置新的按钮图标</a>
    </div>
</body>
</html>
